package com.seguriapp.common.gwt.client.pagination;

import com.google.gwt.event.shared.EventBus;
import com.seguriapp.common.gwt.client.SeguriAppDisplay;
import com.seguriapp.common.gwt.client.SeguriAppPresenter;

public class SearchPaginationPresenter implements SeguriAppPresenter {

  @SuppressWarnings("unused")
  private final Display display;
  private EventBus eventBus;

  public SearchPaginationPresenter(final EventBus eventBus, final Display display) {
    this.eventBus = eventBus;
    display.setPresenter(this);
    this.display = display;
  }

  public void start() {
  }

  public void changePage(final long numeroPagina) {
    eventBus.fireEvent(new PageChangedEvent(numeroPagina));
  }

  public interface Display extends SeguriAppDisplay {

    /**
     * setea el presenter del activity
     */
    void setPresenter(SearchPaginationPresenter presenter);

  }
}
